package bdz.projects.atwww.electrolux.ui
{
	import bdz.projects.atwww.electrolux.ui.core.ELCoreUI;
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	import gs.TweenMax;
	import gs.easing.Strong;

	public class ELPlayPauseControl extends ELCoreUI {
		private var hl:MovieClip;
		private var roller:MovieClip;
		
		public function ELPlayPauseControl() {
			super(getAbstract());
			hl = this["playhighlight"];
			roller = this["playroller"];
			roller.alpha = 0;
			hl.alpha = 0;
			buttonMode = true;
		}
		override protected function initializeComponent():void{
			addEventListener(MouseEvent.ROLL_OVER, onRollActions);
			addEventListener(MouseEvent.ROLL_OUT, onRollActions);
		}
		public function setToPlay():void{
			TweenMax.to(hl, 1, {alpha:1, ease:Strong.easeOut});
		}
		public function setToStop():void{
			TweenMax.to(hl, 1, {alpha:0, ease:Strong.easeOut});
		}
		private function onRollActions(evt:MouseEvent):void{
			TweenMax.to(roller, 1, {alpha:(evt.type == MouseEvent.ROLL_OVER) ? 1 : 0, ease:Strong.easeOut});			
		}
		
		
	}
}